home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / e / queuestack.readme < prev    next >
Text File  |  1995-02-12  |  3KB  |  93 lines

  1. Short:    A queue & stack for Amiga E, v2.
  2. Author:   jvanriper@uncavx.unca.edu
  3. Uploader: jvanriper@uncavx.unca.edu
  4. Type:     dev/e
  5.  
  6. Long:
  7.  
  8.  QueueStack v2.0, from the Cheese Olfactory Workshop (written by
  9.  Trey Van Riper) for Amiga E 3.1.
  10.  
  11. It's designed to act as both a stack and a queue.  In fact,
  12. you could change your mind in the middle of either adding or
  13. getting objects into the queuestack to make it act as a
  14. stackqueue.. or whatever.  You can put anything into the
  15. queuestack.. in fact, you could put varying types of data in
  16. the queuestack (of course, you'll have to figure out what
  17. you put in it yourself).  Thanks go to Amiga E as a typeless
  18. language.
  19.  
  20. This second version adds a tremendous amount of
  21. functionality to the queuestack in letting you iterate
  22. through it.  As a result, procFrontToBack/procBackToFront()
  23. have been deleted, in favor of some slightly more useful
  24. phrases (inject/injectBackwards).
  25.  
  26. This second version also allows you to enter '0' as an item,
  27. if you provide another value that can be used as a
  28. replacement instead.  Unfortunately, queuestack needs some
  29. means by which it can determine a non-valid item in order to
  30. perform certain tests.  In the first version, '0' was that
  31. value, however, this prevented '0' from being a value that
  32. could be used in the queuestack (say, if you were working
  33. with strictly integers or something).  Now you may determine
  34. what constitutes a non-valid item (say, you don't expect to
  35. have any integers of a value -1, then you could use -1).
  36.  
  37. Here's a cut-down ShowModule output:
  38.  
  39. ---------------------------------------------------------------------
  40. ShowModule v1.9 (c) 1992 $#%!
  41. now showing: "queuestack.m"
  42. NOTE: don't use this output in your code, use the module instead.
  43.  
  44. /* this module contains 5496 bytes of code! */
  45.  
  46. /* ... and 56 reloc entries */
  47.  
  48. DEF queuestack_ctrlc
  49. /* 2 private global variable(s) in this module */
  50.  
  51. (---) OBJECT queuestack
  52.         new(a,b)
  53.         addFirst(a)
  54.         addLast(a)
  55.         getFirst()
  56.         getLast()
  57.         getSize()
  58.         addFirstQS(a)
  59.         addLastQS(a)
  60.         inject(a,b)
  61.         injectBackwards(a,b)
  62.         do(a)
  63.         doBackwards(a)
  64.         collect(a)
  65.         collectBackwards(a)
  66.         conform(a)
  67.         detect(a)
  68.         detectBackwards(a)
  69.         reject(a)
  70.         rejectBackwards(a)
  71.         select(a)
  72.         selectBackwards(a)
  73.         asList()
  74.         asListBackwards()
  75.         asQueueStack(a)
  76.         asQueueStackBackwards(a)
  77.         kill()
  78.         end()
  79. (---) ENDOBJECT     /* SIZEOF=20 */
  80. ---------------------------------------------------------------------
  81.  
  82.  
  83. ============================= Archive contents =============================
  84.  
  85. Original  Packed Ratio    Date     Time    Name
  86. -------- ------- ----- --------- --------  -------------
  87.    13192    4608 65.0% 26-Jan-95 19:11:54  example
  88.     5659    1799 68.2% 26-Jan-95 19:11:50  example.e
  89.    14527    5711 60.6% 26-Jan-95 19:07:06  queuestack.doc
  90.     7102    1953 72.5% 27-Jan-95 08:50:34  queuestack.m
  91. -------- ------- ----- --------- --------
  92.    40480   14071 65.2% 28-Jan-95 02:21:22   4 files
  93.